// TODO: would be nice to add JSDocs for each of these to describe when they appear in CLI output
/**
 * This file should be kept up to date with the source of truth in the Slack CLI repo
 */
export const SlackTracerId = {
  SLACK_TRACE_ADMIN_APPROVAL_REQUEST_PENDING: 'SLACK_TRACE_ADMIN_APPROVAL_REQUEST_PENDING',
  SLACK_TRACE_ADMIN_APPROVAL_REQUEST_REASON_SUBMITTED: 'SLACK_TRACE_ADMIN_APPROVAL_REQUEST_REASON_SUBMITTED',
  SLACK_TRACE_ADMIN_APPROVAL_REQUEST_SEND_ERROR: 'SLACK_TRACE_ADMIN_APPROVAL_REQUEST_SEND_ERROR',
  SLACK_TRACE_ADMIN_APPROVAL_REQUEST_SHOULD_SEND: 'SLACK_TRACE_ADMIN_APPROVAL_REQUEST_SHOULD_SEND',
  SLACK_TRACE_ADMIN_APPROVAL_REQUIRED: 'SLACK_TRACE_ADMIN_APPROVAL_REQUIRED',
  SLACK_TRACE_AUTH_LIST_COUNT: 'SLACK_TRACE_AUTH_LIST_COUNT',
  SLACK_TRACE_AUTH_LIST_INFO: 'SLACK_TRACE_AUTH_LIST_INFO',
  SLACK_TRACE_AUTH_LIST_SUCCESS: 'SLACK_TRACE_AUTH_LIST_SUCCESS',
  SLACK_TRACE_AUTH_LOGIN_START: 'SLACK_TRACE_AUTH_LOGIN_START',
  SLACK_TRACE_AUTH_LOGIN_SUCCESS: 'SLACK_TRACE_AUTH_LOGIN_SUCCESS',
  SLACK_TRACE_AUTH_LOGOUT_START: 'SLACK_TRACE_AUTH_LOGOUT_START',
  SLACK_TRACE_AUTH_LOGOUT_SUCCESS: 'SLACK_TRACE_AUTH_LOGOUT_SUCCESS',
  SLACK_TRACE_AUTH_REVOKE_START: 'SLACK_TRACE_AUTH_REVOKE_START',
  SLACK_TRACE_AUTH_REVOKE_SUCCESS: 'SLACK_TRACE_AUTH_REVOKE_SUCCESS',
  SLACK_TRACE_COLLABORATOR_ADD_COLLABORATOR: 'SLACK_TRACE_COLLABORATOR_ADD_COLLABORATOR',
  SLACK_TRACE_COLLABORATOR_ADD_SUCCESS: 'SLACK_TRACE_COLLABORATOR_ADD_SUCCESS',
  SLACK_TRACE_COLLABORATOR_LIST_COLLABORATOR: 'SLACK_TRACE_COLLABORATOR_LIST_COLLABORATOR',
  SLACK_TRACE_COLLABORATOR_LIST_COUNT: 'SLACK_TRACE_COLLABORATOR_LIST_COUNT',
  SLACK_TRACE_COLLABORATOR_LIST_SUCCESS: 'SLACK_TRACE_COLLABORATOR_LIST_SUCCESS',
  SLACK_TRACE_COLLABORATOR_REMOVE_COLLABORATOR: 'SLACK_TRACE_COLLABORATOR_REMOVE_COLLABORATOR',
  SLACK_TRACE_COLLABORATOR_REMOVE_SUCCESS: 'SLACK_TRACE_COLLABORATOR_REMOVE_SUCCESS',
  SLACK_TRACE_CREATE_DEPENDENCIES_SUCCESS: 'SLACK_TRACE_CREATE_DEPENDENCIES_SUCCESS',
  SLACK_TRACE_CREATE_ERROR: 'SLACK_TRACE_CREATE_ERROR',
  SLACK_TRACE_CREATE_PROJECT_PATH: 'SLACK_TRACE_CREATE_PROJECT_PATH',
  SLACK_TRACE_CREATE_START: 'SLACK_TRACE_CREATE_START',
  SLACK_TRACE_CREATE_SUCCESS: 'SLACK_TRACE_CREATE_SUCCESS',
  SLACK_TRACE_CREATE_TEMPLATE_OPTIONS: 'SLACK_TRACE_CREATE_TEMPLATE_OPTIONS',
  SLACK_TRACE_DATASTORE_COUNT_DATASTORE: 'SLACK_TRACE_DATASTORE_COUNT_DATASTORE',
  SLACK_TRACE_DATASTORE_COUNT_SUCCESS: 'SLACK_TRACE_DATASTORE_COUNT_SUCCESS',
  SLACK_TRACE_DATASTORE_COUNT_TOTAL: 'SLACK_TRACE_DATASTORE_COUNT_TOTAL',
  SLACK_TRACE_ENV_ADD_SUCCESS: 'SLACK_TRACE_ENV_ADD_SUCCESS',
  SLACK_TRACE_ENV_LIST_COUNT: 'SLACK_TRACE_ENV_LIST_COUNT',
  SLACK_TRACE_ENV_LIST_VARIABLES: 'SLACK_TRACE_ENV_LIST_VARIABLES',
  SLACK_TRACE_ENV_REMOVE_SUCCESS: 'SLACK_TRACE_ENV_REMOVE_SUCCESS',
  SLACK_TRACE_FEEDBACK_MESSAGE: 'SLACK_TRACE_FEEDBACK_MESSAGE',
  SLACK_TRACE_MANIFEST_VALIDATE_SUCCESS: 'SLACK_TRACE_MANIFEST_VALIDATE_SUCCESS',
  SLACK_TRACE_PLATFORM_DEPLOY_SUCCESS: 'SLACK_TRACE_PLATFORM_DEPLOY_SUCCESS',
  SLACK_TRACE_PLATFORM_RUN_READY: 'SLACK_TRACE_PLATFORM_RUN_READY',
  SLACK_TRACE_PLATFORM_RUN_START: 'SLACK_TRACE_PLATFORM_RUN_START',
  SLACK_TRACE_PLATFORM_RUN_STOP: 'SLACK_TRACE_PLATFORM_RUN_STOP',
  SLACK_TRACE_TRIGGERS_ACCESS_ERROR: 'SLACK_TRACE_TRIGGERS_ACCESS_ERROR',
  SLACK_TRACE_TRIGGERS_ACCESS_SUCCESS: 'SLACK_TRACE_TRIGGERS_ACCESS_SUCCESS',
  SLACK_TRACE_TRIGGERS_CREATE_SUCCESS: 'SLACK_TRACE_TRIGGERS_CREATE_SUCCESS',
  SLACK_TRACE_TRIGGERS_CREATE_URL: 'SLACK_TRACE_TRIGGERS_CREATE_URL',
};

export const SlackProduct = {
  FREE: 'FREE',
  PRO: 'PRO',
  BUSINESS_PLUS: 'PLUS',
  ENTERPRISE: 'ENTERPRISE',
  ENTERPRISE_SANDBOX: 'ENTERPRISE_SANDBOX',
  ENTERPRISE_SELECT: 'ENTERPRISE_SELECT',
};

/**
 * See https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797 for more info on keypress encodings
 */
export const keyboardPress = {
  ENTER: '\r\n',
  DOWN_ARROW: '\u001b[B',
  UP_ARROW: '\u001b[A',
};

export const timeouts = {
  waitingGlobal: 30000,
  waitingAction: 10000,
};
